package com.swgk.core.util;

import androidx.core.util.Pair;

import java.util.HashMap;
import java.util.Map;

/**
 * @author : younghow
 * @date : 2021/11/23 16:44
 * description:
 */
public class MapUtils {

    @SafeVarargs
    public final <N,D> Map<N,D> pair2Map(Pair<N, D>... pair){
        Map<N,D> map = new HashMap<>();
        for (Pair<N, D> ndPair : pair) {
            map.put(ndPair.first,ndPair.second);
        }
        return map;
    }
}
